﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true"
    CodeBehind="ServiceReportViewDetail.aspx.cs" Inherits="SEP.Admin.ServiceReportViewDetail" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cphHead" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphTitle" runat="server">
    Service Report Detail
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cphBody" runat="server">    
    <asp:Panel ID="pnlInstrument" runat="server" Visible="false">        
        <table border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td class="alignLeft">
                    <h3>
                        Instrument</h3>
                </td>
                <td class="alignRight">
                </td>
            </tr>
            <tr>
                <td class="alignLeft" colspan="2">
                    <table border="1" rules="all" cellpadding="10" cellspacing="10">
                        <tr>
                            <td>
                                Instrument type
                            </td>
                            <td>
                                <asp:Literal ID="litInstrumentType" runat="server" />
                            </td>
                            <td>
                                Unit no
                            </td>
                            <td>
                                <asp:Literal ID="litUnitNumber" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Manufacturer
                            </td>
                            <td>
                                <asp:Literal ID="litManufacturer" runat="server" />
                            </td>
                            <td>
                                Serial no
                            </td>
                            <td>
                                <asp:Literal ID="litSerialNumber" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Model
                            </td>
                            <td>
                                <asp:Literal ID="litModel" runat="server" />
                            </td>
                            <td>
                                PO #
                            </td>
                            <td>
                                <asp:Literal ID="litPONumber" runat="server" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </asp:Panel>
    <asp:Panel ID="pnlService" runat="server" Visible="false">
    <hr />
        <asp:Panel ID="pnlServiceRequired" runat="server" Visible="false">
            <table>
                <tr>
                    <td class="alignLeft">
                        <h3>
                            Service required</h3>
                    </td>
                </tr>
                <tr>
                    <td class="alignLeft">
                        <asp:Literal ID="litServiceRequired" runat="server" />
                    </td>
                </tr>
            </table>
        </asp:Panel>
        <asp:Panel ID="pnlServicePerformed" runat="server" Visible="false">
            <table>
                <tr>
                    <td class="alignLeft">
                        <h3>
                            Service performed</h3>
                    </td>
                </tr>
                <tr>
                    <td class="alignLeft">
                        <asp:Literal ID="litServicePerformed" runat="server" />
                    </td>
                </tr>
            </table>
        </asp:Panel>
    </asp:Panel>
    <asp:Panel ID="pnlParts" runat="server" Visible="false">
        <hr />
        <table border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td class="alignLeft">
                <h3>
                    Parts</h3>
            </td>
            <td class="alignRight">
            </td>
        </tr>
        <tr>
            <td colspan="2" class="alignLeft" align="left">
                <asp:GridView ID="grvParts" runat="server" AutoGenerateColumns="false" ShowHeaderWhenEmpty="true"
                    HorizontalAlign="Left">
                    <Columns>
                        <asp:TemplateField HeaderText="Description">
                            <ItemTemplate>
                                <asp:Literal ID="litPartDescription" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Description") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Part number">
                            <ItemTemplate>
                                <asp:Literal ID="litPartNumber" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Number") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Quantity">
                            <ItemTemplate>
                                <asp:Literal ID="litPartQuantity" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Quantity") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Price">
                            <ItemTemplate>
                                <asp:Literal ID="litPartPrice" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Price", "{0:C}") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Total">
                            <ItemTemplate>
                                <asp:Literal ID="litPartTotal" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Total", "{0:C}") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField Visible="false">
                            <ItemTemplate>
                                <asp:Literal ID="litPartID" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "ID") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
            </td>
        </tr>
    </table>
    </asp:Panel>
    <hr />
    <table>
        <tr>
            <td class="alignLeft">
                <h3>
                    Totals</h3>
            </td>
        </tr>
        <tr>
            <td class="alignLeft">
                <asp:GridView ID="grvTotals" runat="server" AutoGenerateColumns="false" HorizontalAlign="Left">
                    <Columns>
                        <asp:TemplateField HeaderText="Date" ItemStyle-Width="90px" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <asp:Literal ID="litDate" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Date", "{0:MM/dd/yyyy}") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Labor" ItemStyle-Width="70px" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <asp:Literal ID="litLabor" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Labor") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Travel" ItemStyle-Width="70px" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <asp:Literal ID="litTravel" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Travel") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Mileage" ItemStyle-Width="70px" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <asp:Literal ID="litMileage" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Mileage") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Other" ItemStyle-Width="70px" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <asp:Literal ID="litOther" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Other") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Other Description" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <asp:Literal ID="litOtherDesciption" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "OtherDescription") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
            </td>
        </tr>
        <tr>
            <td>
                <br />
            </td>
        </tr>
        <tr>
            <td>
                <table border="1" rules="all" cellpadding="10" cellspacing="10">
                    <tr>
                        <td class="center" width="70px">
                            Total parts
                        </td>
                        <td class="center" width="70px">
                            Total labor
                        </td>
                        <td class="center" width="70px">
                            Total travel
                        </td>
                        <td class="center" width="70px">
                            Total mileage
                        </td>
                        <td class="center" width="70px">
                            Total other
                        </td>
                    </tr>
                    <tr>
                        <td class="center">
                            <asp:Literal ID="litTotalParts" runat="server" />
                        </td>
                        <td class="center">
                            <asp:Literal ID="litTotalLabor" runat="server" />
                        </td>
                        <td class="center">
                            <asp:Literal ID="litTotalTravel" runat="server" />
                        </td>
                        <td class="center">
                            <asp:Literal ID="litTotalMileage" runat="server" />
                        </td>
                        <td class="center">
                            <asp:Literal ID="litTotalOther" runat="server" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</asp:Content>
